//Refactored
package com.example.sleepdebtcalculatorandroid;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;

public class MainActivity extends Activity {

	private Intent intent;
	public Intent getIntent() {
		return intent;
	}

	public void setIntent(Intent intent) {
		this.intent = intent;
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}
	
	public void startIdealSleepAmountActivity(View v){
		setIntent( new Intent(this, IdealSleepAmountActivity.class));
		startActivity(intent);
	}
	
	public void startActualSleepAmountActivity(View v){
		setIntent( new Intent(this, ActualSleepAmountActivity.class));
		startActivity(intent);
	}
	
	public void startCalculateSleepDebtActivity(View v){
		
		setIntent( new Intent(this, CalculateSleepDebtActivity.class));
		startActivity(intent);
	}

}
